grammar FOLStage1;

@header
{
package org.protege.owl.examples.tab.grammar;
}

@lexer::header
{
package org.protege.owl.examples.tab.grammar;
}

stat returns [String cleanVal]
	@init
	{
		$cleanVal="";
	}
	:
	(NEWLINE | WS)* (item {$cleanVal+=$item.text;} (NEWLINE | WS)* {$cleanVal+=" ";})* DOT {$cleanVal+=".";}
	;

item
	:
	(ID | INT | COMA | COLON | SEMICOLON | HYPHEN)
	;

ID: ('a'..'z'|'A'..'Z'|'_')('a'..'z'|'A'..'Z'|'0'..'9'|'_')*;

INT: ('1'..'9')('0'..'9')*;

DOT: '.';

COMA: ',';

COLON: ':';

SEMICOLON: ';';

HYPHEN: '-';

NEWLINE:'\r' ? '\n' ;

WS : (' ' |'\t' |'\n' |'\r' );
